Skip to main content
Version: 5.x.x

RequestMockType


import { RequestMockType } from "@hyper-fetch/core"

Description

Defined in mocker/mocker.types.ts:3

Preview

type RequestMockType<Response> = {
config: { requestTime?: number; responseTime?: number; timeout?: boolean; totalDownloaded?: number; totalUploaded?: number };
data: Response | Response[] | () => Response;
extra: any;
status: number | string;
success: boolean;
}

Structure

{
config: {
requestTime: number;
responseTime: number;
timeout: boolean;
totalDownloaded: number;
totalUploaded: number;
};
data: Response | Response[] | () => Response;
extra: any;
status: number | string;
success: boolean;
}